/* eslint-disable */

export default {
  data() {
    return {
      // 资产标签表单
      tagForm:{
        assetId: '10001000',
        assetTag: '',
      },

      // 标签选项
      options: [{
        value: '1',
        label: '流动资产'
      }, {
        value: '2',
        label: '长期资产'
      }, {
        value: '3',
        label: '无形资产'
      }, {
        value: '4',
        label: '有形资产'
      }, {
        value: '5',
        label: '固定资产'
      }, {
        value: '6',
        label: '领用'
      }, {
        value: '7',
        label: '归还'
      }, {
        value: '8',
        label: '维修'
      }],

      // 资产标签表单验证
      tagRules:{
        assetId: [
          { required: true, message: '请输入资产ID', trigger: 'blur' },
        ],
        assetTag: [
          { required: true, message: '请输入资产标签', trigger: 'blur' },
        ],
      },
    }
  },
  mounted() {
  },
  methods: {
    // 提交表单
    tagSubmit(formName){
      console.log(this.tagForm)
      this.$refs[formName].validate((valid) => {
        if (valid) {
          this.$message({
            type: 'success',
            message: '标签添加成功!'
          })
          this.dialogCompany.status = false
        } else {
          this.$message({
            type: 'warning',
            message: '请填写相关信息!'
          })
          return false;
        }
      });
    },

    // 取消表单
    tagCancel(){
      this.$message({
        type: 'warning',
        message: '已取消...'
      })
      this.tagForm = {
        assetId: '',
        assetTag: '',
      }
    }
  }
}